#include "contrl/mycontrol.h"
MyControl*MyControl::con=nullptr;
MyControl *MyControl::getInstance()
{
    if(MyControl::con==nullptr)
    {
        MyControl::con=new MyControl();
    }
    return MyControl::con;
}

MyControl::MyControl()
{

}

BaseModel *MyControl::getModel(QString tabelName)
{
    if(tabelName=="user_info")
    {
        this->model=new UserModel();
    }
    else if(tabelName=="video_file")
    {
        this->model=new VideoModel();
    }
    else if(tabelName=="Image_file")
    {
        this->model=new ImageModel();
    }
    else if(tabelName=="operation_log")
    {
        this->model=new LogModel();
    }
    else if(tabelName=="logAddUser")
    {
        this->model=new LogAddUserModel();
    }
    else if(tabelName=="device_info")
    {
        this->model=new DeviceModel();
    }
    return this->model;
}
